import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'
import VueAxios from 'vue-axios'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import Avue from '@smallwei/avue';
import '@smallwei/avue/lib/index.css';
import Print from 'vue-print-nb'
import moment from 'moment'
import * as echarts from 'echarts';
import dataV from '@jiaminghi/data-view'
import GoEasy from "goeasy";


Vue.use(dataV)

//全局安装axios
Vue.use(VueAxios, axios)
const http = axios.create({
  baseURL: process.env.VUE_APP_API_URL
})

//goEasy 全局挂载
Vue.prototype.$goeasy = GoEasy.getInstance({
  host: "hangzhou.goeasy.io",  //若是新加坡区域：singapore.goeasy.io
  appkey: "BC-2d04526a2e3843e1a155de771785533c",
  modules: ['pubsub']//根据需要，传入‘pubsub’或'im’，或数组方式同时传入
});

//解决axios发送数据包问题
Vue.prototype.$axios = http
window.axios = http

//全局安装element
Vue.use(ElementUI);
Vue.prototype.$moment = moment
Vue.prototype.$echarts = echarts

//全局注册打印功能
Vue.use(Print);

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

//全局配置Avue
Vue.use(Avue,{axios});